simulateStreamingMiddleware

Wraps a non-streaming model into a fake streaming surface. Useful when a provider's batch-only generate is the only path available and the UI needs a stream contract.

Mirrors v6's simulateStreamingMiddleware. Calls the downstream generate (NOT the downstream stream), then synthesizes a stream:

  1. TextStart → TextDelta(fullText) → TextEnd (if text is non-empty)

  2. One ToolCall per result.toolCalls

  3. StepFinish + Finish with the result's finish reason + usage

Per v6 conventions, all synthesized text events share a single id ("sim_text") since the simulation produces exactly one text segment.